What makes a man a man is a question which has exercised minds for centuries. Historically, men have always desired a son & much speculation has surrounded what determines sex. Even {Aristotle} deliberated on the ways men are made, considering factors such as the vigor & position of couples during sexual intercourse!! Everything from diet, to the weather has been credited as the necessary switch.
Significant progress in the late 1950's established that normal women have 2 X {chromosomes}. Normal men have 1 X chromosome & 1 Y chromosome, the understanding being the Y chromosome has something to do with men being men. More recently, researchers believe they have identified a tiny region of the Y chromosome which contains the male sex-determining gene.
#foetus 8 weeks
In the developing human {fetus}, before the age of 7-8 weeks, it is impossible to distinguish male & female. Testes form when the gene is present, {ovaries} when it's absent. All other sexual differences derive from whether you have a {testis} or {ovary}.